package com.emokili.ewa.portal.controller;

import com.emokili.ewa.common.exception.BizCodeEnum;
import com.emokili.ewa.common.exception.BusinessException;
import com.emokili.ewa.core.frame.vo.MemberFriendVo;
import com.emokili.ewa.core.frame.vo.PlayListAddVo;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/web/friends")
public class FriendController {


    @PostMapping("/invite")
    @ResponseBody
    public void invite(@RequestBody MemberFriendVo memberFriendVo){
        if(StringUtils.isEmpty(memberFriendVo.getFullName())){
            throw new BusinessException(BizCodeEnum.NAME_IS_NULL);
        }
        if(StringUtils.isEmpty(memberFriendVo.getFriendAccount())){
            throw new BusinessException(BizCodeEnum.USER_NAME_OR_EMAIL_IS_NULL);
        }

    }
}
